package org.scohen.juploadr.app.scalers;

import org.scohen.juploadr.prefs.Configuration;

public class ImageScalerFactory {
    private static final Scaler qualityScaler = new JAIScaler();
    private static final Scaler speedScaler = new SWTScaler();

    public static synchronized Scaler getScaler() {
        if (Configuration.getInstance().isScalingQualityFavored()) {
            return qualityScaler;
        }
		return speedScaler;
    }
}
